package com.zyong.design.pattern.responsibility.case4;

/**
 * @program: zyong-design-pattern
 * @ClassName: GmHandler
 * @author: zyong
 * @create: 2024-04-13 18:21
 */
public class GmHandler extends AbstractApproveHandler {
    @Override
    protected void process(LeaveRequest request) {
        if ((request.getWorkingAge() >= 2) && (request.getNumOfDays() > 3)) {
            System.out.println(request.getName() + ", 你通过总经理的审批");
        } else {
            System.out.println("在公司年限不够，长假未通过总经理审批");
        }
    }
}
